#include "InputHandler.h"
#include "KMController.h"

KMController* input;

// keyboard functions
void KeyUp (unsigned char key, int x, int y)
{
	input->keyReleased(key,x,y);
}

void KeyDown (unsigned char key, int x, int y)
{
	input->keyPressed(key,x,y);
}

void KeySpecUp (int key, int x, int y)
{
	input->specialKeyReleased(key,x,y);
}

void KeySpecDown (int key, int x, int y)
{
	input->specialKeyPressed(key,x,y);
}

// mouse functions
void MouseButton (int button, int state, int x, int y)
{
	input->mouseButtonEvent(button,state,x,y);
}

void MousePaMove (int x, int y)
{
	input->mousePassiveMovement(x,y);
}

void MouseAcMove (int x, int y)
{
	input->mouseActiveMovement(x,y);
}

void MouseEntry (int state)
{
	input->mouseFocusChange(state);
}

// Initialisation
void InputInit (KMController * c)
{
	input = c;
}